package com.github.prontera.model;

import java.time.OffsetDateTime;
import java.time.ZoneOffset;

import lombok.EqualsAndHashCode;
import lombok.ToString;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.github.prontera.model.request.RestfulRequest;
import com.github.prontera.util.converter.jackson.OffsetDateTimeToIso8601Serializer;

/**
 * 标识Domain并且限定CrudService边界
 *
 * @author Alex
 */
@ToString(callSuper = true)
@EqualsAndHashCode
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(value = { "hibernateLazyInitializer", "handler", "fieldHandler" }, ignoreUnknown = true)
public class IdentityDomain extends RestfulRequest {
	private static final long serialVersionUID = 2806569656265256243L;

	public static final OffsetDateTime DEFAULT_DATE_TIME = OffsetDateTime.of(1970, 1, 1, 0, 0, 0, 0, ZoneOffset.ofHours(8));

	private Long id;
	
	private Long clientId;

	 @JsonSerialize(using = OffsetDateTimeToIso8601Serializer.class)
	private OffsetDateTime createTime;

	 @JsonSerialize(using = OffsetDateTimeToIso8601Serializer.class)
	private OffsetDateTime updateTime;

	 @JsonSerialize(using = OffsetDateTimeToIso8601Serializer.class)
	private OffsetDateTime deleteTime;
	/**
	 * 手机号
	 */
	private String mobile;
	
	public String getMobile() {
		return mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}

	public Long getClientId() {
		return clientId;
	}

	public void setClientId(Long clientId) {
		this.clientId = clientId;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public OffsetDateTime getCreateTime() {
		return createTime;
	}

	public void setCreateTime(OffsetDateTime createTime) {
		this.createTime = createTime;
	}

	public OffsetDateTime getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(OffsetDateTime updateTime) {
		this.updateTime = updateTime;
	}

	public OffsetDateTime getDeleteTime() {
		return deleteTime;
	}

	public void setDeleteTime(OffsetDateTime deleteTime) {
		this.deleteTime = deleteTime;
	}
	
}
